import request from '@/utils/request'

export function findAllByPage(params) {
  return request({
    url: '/order/purchase/list2',
    method: 'get',
    params
  })
}


export function addOrderPurchase(data) {
  return request({
    url: '/order/purchase/add',
    method: 'post',
    data
  })
}

export function updateOrderPurchase(data) {
  return request({
    url: '/order/purchase/update',
    method: 'post',
    data
  })
}

export function deleteOrderPurchase(ids) {
  return request({
    url: '/order/purchase/delete',
    method: 'post',
    params:{ ids:ids }
  })
}


export function findAllWarehouseName() {
  return request({
    url: '/base/warehouse/namelist',
    method: 'get',
  })
}

export function findAllSupplierName() {
  return request({
    url: '/base/supplier/namelist',
    method: 'get',
  })
}
export function uploadExcel(data) {
  return request({
    url: '/order/purchase/upload/excel',
    method: 'post',
    data
  })
}



